#ifndef __MAGIK_URANUS_COMMON_COMMON_UTILS_NRISCV_H__
#define __MAGIK_URANUS_COMMON_COMMON_UTILS_NRISCV_H__

#include "common_type.h"
#include <stdint.h>
#include <stdio.h>

namespace magik {
namespace uranus {
ALG_PACK_START

enum class BsPadType : int URANUS_API {
    NONE = -1,        /*no pad value*/
    BOTTOM_RIGHT = 0, /*fill pad value in bottom and right of output image*/
    SYMMETRY = 1,     /*fill pad value around the output image symmetrically*/
};
struct URANUS_API BsBaseParam {
    ChannelLayout in_layout;  /*input format:NV12 BGRA RGBA*/
    ChannelLayout out_layout; /*output format:NV12 BGRA RGBA*/
    /*coef_off_enable: enable or disable coef and offset in color format convert
     *true: calculate by coef and offset
     *false: calculate by default parameters*/
    bool coef_off_enable = false;
    /*true:resize->resize,convert
     *false: convert,resize->resize*/
    bool first_resize = false;
    uint32_t coef[9];   /*nv12 to bgra param*/
    uint32_t offset[2]; /*nv12 to bgra pixel offset*/
};
struct URANUS_API AddressDesc {
    void *phy_addr = NULL; /*physical address*/
    void *vir_addr = NULL; /*virtual address*/
};
struct URANUS_API BsCommonParam : public BsBaseParam {
    BsPadType pad_type; /*BOTTOM_RIGHT or SYMMETRY*/
    uint8_t pad_val;    /*value of pad*/
    float scale_x = 0.0;
    float scale_y = 0.0;
    int real_chn = 0;
    int input_height;      /*input image height*/
    int input_width;       /*input image width*/
    int input_line_stride; /*input line stride*/
    AddressDesc addr_attr;
};

ALG_PACK_END
} // namespace uranus
} // namespace magik
#endif /* __MAGIK_URANUS_COMMON_COMMON_UTILS_NRISCV_H__ */
